home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / mkutil21.zip / MAKEDEFS / WC16.MK < prev    next >
Text File  |  1995-02-06  |  4KB  |  143 lines

  1. #############################################################################
  2. #
  3. #                       Copyright (C) 1994 SciTech Software
  4. #                               All rights reserved.
  5. #
  6. # Descripton:   Generic DMAKE startup makefile definitions file. Assumes
  7. #               that the SCITECH environment variable has been set to point
  8. #               to where all our stuff is installed. You should not need
  9. #               to change anything in this file.
  10. #
  11. #               Watcom C++ 10.0 16 bit version.
  12. #
  13. # $Id: wc16.mk 1.1 1995/02/06 12:49:39 kjb release $
  14. #
  15. #############################################################################
  16.  
  17. # Disable warnings for macros redefined here that were given
  18. # on the command line.
  19. __.SILENT       := $(.SILENT)
  20. .SILENT         := yes
  21.  
  22. # File suffix definitions
  23.    L            := .lib   # Libraries
  24.    E            := .exe   # Executables
  25.    O            := .obj   # Objects
  26.    A            := .asm   # Assembler sources
  27.    P            := .cpp   # C++ sources
  28.  
  29. # Import enivornment variables that we use
  30. TMPDIR := $(ROOTDIR)/tmp
  31. .IMPORT .IGNORE : TMPDIR COMSPEC INCLUDE LIB SCITECH DBG OPT SHW BETA FPU
  32. .IMPORT .IGNORE : USE_WIN16
  33.  
  34. # We use the MSDOS shell at all times
  35.    SHELL        := $(COMSPEC)
  36.    GROUPSHELL   := $(SHELL)
  37.    SHELLFLAGS   := $(SWITCHAR)c
  38.    GROUPFLAGS   := $(SHELLFLAGS)
  39.    SHELLMETAS   := *"?<>
  40.    GROUPSUFFIX  := .bat
  41.    DIRSEPSTR    := \\
  42.    DIVFILE       = $(TMPFILE:s,/,\)
  43.  
  44. # Default commands for compiling, assembling linking and archiving
  45.    CC           := wcl      # C-compiler and flags
  46.    CFLAGS       := -ml -zq -w2 -s -fh -fhq
  47.    AS           := tasm     # Assembler and flags
  48.    ASFLAGS      := /mx /m /D__LARGE__ /i$(SCITECH)\INCLUDE
  49.    LD           := wlink    # Loader and flags
  50.    LDFLAGS       =
  51.    LIB          := wlib     # Librarian
  52.    LIBFLAGS     := -q
  53.  
  54. # Optionally turn on debugging information
  55. .IF $(DBG)
  56.    CFLAGS       += -d2      # Turn on debugging for C compiler
  57.    LIBFLAGS     += -p=128   # Larger page size for libraries with debug info!
  58.    ASFLAGS      += /zi      # Turn on debugging for assembler
  59.    LDFLAGS      += D A      # Turn on debugging for linker
  60. .END
  61.  
  62. # Optionally turn on optimisations
  63. .IF $(OPT)
  64.    CFLAGS       += -oneatx -5
  65. .END
  66.  
  67. # Optionally turn on direct i387 FPU instructions optimised for Pentium
  68.  
  69. .IF $(FPU)
  70.    CFLAGS       += -fpi87 -fp5 -DFPU387
  71.    ASFLAGS      += -DFPU387
  72. .END
  73.  
  74. # Optionally compile a shareware version of a product
  75. .IF $(SHW)
  76.    LIB_DIR      := LIBSW
  77.    CFLAGS       += -DSHAREWARE
  78. .ELSE
  79.    LIB_DIR      := LIB
  80. .END
  81.  
  82. # Optionally compile a beta release version of a product
  83. .IF $(BETA)
  84.    CFLAGS       += -DBETA
  85.    ASFLAGS      += -DBETA
  86. .END
  87.  
  88. # Use a larger stack during linking if requested
  89.  
  90. .IF $(STKSIZE)
  91.     LDFLAGS     += OP STACK=$(STKSIZE)
  92. .ENDIF
  93.  
  94. .IF $(USE_WIN16)
  95.    DX_CFLAGS    += -DWINDPMI16
  96.    DX_ASFLAGS   += -DWINDPMI16
  97. .END
  98.  
  99. # Place to look for PMODE library files
  100.  
  101. .IF $(MK_PMODE)
  102. .ELIF $(USE_WIN16)
  103. PMLIB           := win16\pmode.lib,
  104. .ELSE
  105. PMLIB           := pmode.lib,
  106. .END
  107.  
  108. # Define where to install library files
  109.    LIB_BASE     := $(SCITECH)\$(LIB_DIR)\WC16
  110.    LIB_DEST     := $(LIB_BASE)
  111.  
  112. # Definition of $(MAKE) macro for recursive makes.
  113.    MAKE = $(MAKECMD) $(MFLAGS)
  114.  
  115. # Macro to install a library file
  116.    INSTALL      := cp
  117.  
  118. # Implicit generation rules for making object files
  119.    %$O: %.c ; +$(CC) $(CFLAGS) -c $<
  120.    %$O: %$P ; +$(CC) $(CFLAGS) -c $<
  121.    %$O: %$A ; +$(AS) $(ASFLAGS) $(<:s,/,\)
  122.  
  123. # Implicit rule for building a library file using response file
  124.    %$L: ; +$(LIB) $(LIBFLAGS) $@ @$(mktmp,$*.rsp -+$(?:t"\n-+")\n)
  125.  
  126. # Implicit rule for building an executable file using response file
  127.    %$E: ;
  128. @[
  129.     @trimlib $(mktmp OP quiet\nN $@\nF $(&:t",":s/\/\\)\nLIBR $(PMLIB) $(EXELIBS:t",")) $*.lnk
  130.     $(LD) $(LDFLAGS) @$*.lnk
  131.     @rm $*.lnk
  132. ]
  133.  
  134. # DMAKE uses this recipe to remove intermediate targets
  135. .REMOVE :; $(RM) -f $<
  136.  
  137. # Turn warnings back to previous setting.
  138. .SILENT := $(__.SILENT)
  139.  
  140. # We dont use TABS in our makefiles
  141. .NOTABS         := yes
  142.  
  143.